package com.baogu.factoryjob.service;

import com.baogu.model.job.*;
import com.baogu.model.job.where.*;

import java.util.List;

public interface BaoGuDataService {
    /**
     * 是否有效控制器
     * @param id
     * @return
     */
    String isEffective(String id);

    /**
     * 根据控制器id和端口号去获取信息
     * @return
     */
    Controllersensor getControllersensorByIdAndPort(ControllersensorWhere where);

    /**
     * 设置控制器状态
     * @param controllerStatus
     * @return
     */
    Integer setControllerStatus(ControllerStatus controllerStatus);

    /**
     * 获取采集点作物中间表
     * @param where
     * @return
     */
    CollectionPointCropRel getCollectionPointCropRel(CollectionPointCropRelWhere where);

    /**
     *  获取节点数据
     * @param where
     * @return
     */
    List<CropUploadDataPeriodRecord> getCropUploadDataPeriodRecord(CropUploadDataPeriodRecordWhere where);

    LiftCycleEntity getLiftCycleEntity(LiftCycleEntityWhere where);

    LiftWarnEntity getLiftWarnEntity(LiftWarnEntityWhere where);

    /**
     * 保存报警消息
     * @param messageNoticeEntity
     */
    void saveMessageNotice(MessageNoticeEntity messageNoticeEntity);

    /**
     * 保存定时任务错误
     * @param errorJobWhere
     */
    void saveErrorJob(ErrorJobWhere errorJobWhere);

    /**
     * 获取定时器任务错误列表
     * @param errorJobWhere
     * @return
     */
    List<ErrorJob> errorJobList(ErrorJobWhere errorJobWhere);

    /**
     * 更新任务状态
     * @param errorJobWhere
     * @return
     */
    Integer updateErrorJobState(ErrorJobWhere errorJobWhere);

    /**
     * 获取重新计算数据
     * @param where
     * @return
     */
    ReUploadData getReUploadData(ReUploadDataWhere where);

    /**
     * 更新计算后的数据
     * @param where
     */
    void updateReUploadData(ReUploadDataWhere where);
}
